import { VagueOject } from "@/types/common";

interface ConfigType {
    devBaseUrl: string,
    prodBaseUrl: string,
    apiList: VagueOject,
    checkEnvironment(): string
}

export const config: ConfigType = {
    devBaseUrl: "http://127.0.0.1:3030",
    prodBaseUrl: "http://127.0.0.1:3000/api/json/prod",
    apiList: {
        notice: "/home/notice",//首页
    },
    checkEnvironment() {
        let url: string = ""
        switch (import.meta.env.MODE) {
            case "development":
                url = this.devBaseUrl
                break;
            case "production":
                url = this.prodBaseUrl
                break;
        }
        return url;
    }
}